#include<bits/stdc++.h>
#define int long long
using namespace std;
int a[7] = {0, 2, 1, 2, 1, 3, 1};

signed main() {
	int t;
	while(cin >> t) {
		if(t == 2) {
			cout << 2 << '\n';
			continue;
		}
		int ret = t / 6;
		t -= 6 * ret;
		ret += a[t];
		cout << ret << '\n';
	}
	return 0;
}
